{include file="public/header" /}
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>大客户类型</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
<form method="get" name="formSearch" id="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt>大客户类型名称：</dt>
                <dd><input class="txt" name="search_brand_name" id="search_brand_name" value="{$search_brand_name}" type="text"></dd>
            </dl>
            <div class="btn_group">
                 <a href="javascript:document.formSearch.submit();" class="btn " title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                 {if $search_brand_name != ''  }
                    <a class="btn" href="{:url('Memberdatype/index')}" title="{$Think.lang.ds_cancel_search}"><span>取消</span></a>
                 {/if}
            </div>
        </div>
        <input type="hidden" value="" name="export">
    </form>
    <table class="ds-default-table">
        <thead>
        <tr class="thead">
            <th class="w48">{$Think.lang.ds_sort}</th>
            <th>大客户类型名称</th>
            <th class="w300 align-center">{$Think.lang.ds_created_at}</th>
            <th class="w300 align-center">排序</th>
            <th class="w300 align-center">状态</th>
            <th class="w200 align-center">{$Think.lang.ds_handle}</th>
        </tr>
        </thead>
        <tbody id="treet1">
        {notempty name="list"}
        {foreach name="list" item="v" key="k"}
        <tr class="hover edit" id="ds_row_{$v.id}">
            <td class="sort">{$k+1}</td>
            <td>{$v.title}</td>
            <td>{$v.create_time|date="Y-m-d H:i:s",###}</td>
            <td class="sort"><span title="{$Think.lang.ds_editable}" ajax_branch="adv_branch" datatype="number" fieldid="{$v.id}" fieldname="sort" ds_type="inline_edit" class="editable">{$v.sort}</span></td>
            <td >
                {if $v.status == 1}
                开启
                {else if/}
                禁用
                {/if}
            </td>
            

            <td class="align-center">
                {if $v.status == 1}
                    <a href="javascript:void(0);"
                       onclick="ds_ajaxget_confirm('{:url('Memberdatype/status',['id'=>$v.id,'status'=>$v.status])}','确定要禁用吗？');"
                       class="dsui-btn-del">禁用</a>
                    {else/}   
                    <a href="javascript:void(0);"
                       onclick="ds_ajaxget_confirm('{:url('Memberdatype/status',['id'=>$v.id,'status'=>$v.status])}','确定要开启吗？');"
                       class="dsui-btn-edit">开启</a>
                   <a href="javascript:dsLayerOpen('{:url('Memberdatype/edit',['id'=>$v.id])}','{$Think.lang.ds_edit}-{$v.title}')"
                   class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
                  <a href="javascript:dsLayerConfirm('{:url('Memberdatype/cancels',['id'=>$v.id])}','{$Think.lang.affiche_type_ensure_del}',{$v.id});"
                   class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        {else /}
        <tr class="no_data">
            <td colspan="10">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
        </tbody>
    </table>
    {$showpage}
</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>